<?php

namespace App\Http\Controllers\Admin;

use App\Models\Feedback;
//意见反馈控制器
class FeedbackController extends BaseController
{
    public function __construct(Feedback $feedback)
    {
        parent::__construct();
        $this->feedback = $feedback;
    }

    public function getIndex()
    {
        $flag = 'facdback';
        $res = $this->feedback->getFeedbackList(request());
        return view('admin.backface.index',compact('res','flag'));

    }

    public function postAdd()
    {
        $res = $this->feedback->addFeedback(request());
        return ajax_return($res);
    }


    //ajax删除公告
    public function postDel()
    {
        $res = $this->feedback->delFeedBackById(request());
        return ajax_return($res);
    }
    

}
